home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / comms / non-internet / samba / docs / browsing.txt < prev    next >
Text File  |  1996-06-26  |  6KB  |  146 lines

  1. BROWSING
  2. ========
  3.  
  4. Samba now fully supports browsing. The browsing is supported by nmbd
  5. and is also controlled by options in the smb.conf file (see
  6. smb.conf(5)).
  7.  
  8. Samba can act as a browse master for a workgroup, but currently cannot
  9. act as a domain controller. The ability to be a domain controller will
  10. be added in a later version.
  11.  
  12. To get browsing to work you need to run nmbd as usual, but will need
  13. to use the "workgroup" option in smb.conf to control what workgroup
  14. Samba becomes a part of.
  15.  
  16. The -G option is most useful for simple setups where Samba is browsable
  17. in only one workgroup. In more complex cases the lmhosts file is
  18. better.
  19.  
  20. Be very careful setting up your lmhosts file. An incorrectly setup
  21. lmhosts file can have disasterous results for your net!
  22.  
  23. A simple lmhosts file might be:
  24.  
  25. # This is a simple lmhosts file
  26. #
  27. # This is a host alias. Anyone querying this name
  28. # will get the specified IP
  29. 192.0.2.17 SMBDATA
  30. #
  31. # first put ourselves in workgroup MYGROUP using
  32. # our own net address
  33. 0.0.0.0 MYGROUP G
  34.  
  35. Note in the above that I overrode what workgroup Samba is in using the
  36. G flag. Also note that the 0.0.0.0 address is used, which will be
  37. automatically replaced with the broadcast address for groups, and with
  38. the local IP address for other entries.
  39.  
  40. Samba also has a useful option for a Samba server to offer itself for
  41. browsing on another subnet.
  42.  
  43. This works by the lmhosts file specifying a broadcast address on the
  44. other network to use to find a browse master for the workgroup.
  45.  
  46. For example if you wanted yourself to appear in the workgroup STAFF on
  47. the network which has a broadcast of 192.0.3.255 then this entry would
  48. do the trick:
  49.  
  50. # put ourselves in the STAFF workgroup on the other subnet
  51. 192.0.3.255 STAFF G
  52.  
  53. Notice the G at the end! It is very important you include this as this
  54. entry without the G could cause a broadcast storm! 
  55.  
  56. If something doesn't work then hopefully the log.nmb file will
  57. help you track down the problem. Try a debug level of 2 or 3 for
  58. finding problems.
  59.  
  60. Note that if it doesn't work for you, then you should still be able to
  61. type the server name as \\SERVER in filemanager then hit enter and
  62. filemanager should display the list of available shares.
  63.  
  64. Some people find browsing fails because they don't have the global
  65. "guest account" set to a valid account. Remember that the IPC$
  66. connection that lists the shares is done as guest, and thus you must
  67. have a valid guest account.
  68.  
  69. Also, a lot of people are getting bitten by the problem of too many
  70. parameters on the command line of nmbd in inetd.conf. This trick is to
  71. not use spaces between the option and the parameter (eg: -d2 instead
  72. of -d 2), and to not use the -B and -N options. New versions of nmbd
  73. are now far more likely to correctly find your broadcast and network
  74. addess, so in most cases these aren't needed.
  75.  
  76. The other big problem people have is that their broadcast address,
  77. netmask or IP address is wrong (specified with the -B, -N and -I
  78. options to nmbd). 
  79.  
  80. FORCING SAMBA TO BE THE MASTER
  81. ==============================
  82.  
  83. Who becomes the "master browser" is determined by an election process
  84. using broadcasts. Each election packet contains a number of parameters
  85. which determine what precedence (bias) a host should have in the
  86. election. By default Samba uses a very low precedence and thus loses
  87. elections to just about anyone else.
  88.  
  89. If you want Samba to win elections then just set the "os level" global
  90. option in smb.conf to a higher number. It defaults to 0. Using 33
  91. would make it win all elections over every other system (except other
  92. samba systems!)
  93.  
  94. A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A
  95. NTAS domain controller uses level 32.
  96.  
  97. The maximum os level is 255
  98.  
  99. MAKING SAMBA THE DOMAIN MASTER
  100. ==============================
  101.  
  102. The domain master is responsible for collating the browse lists of
  103. multiple subnets so that browsing can occur between subnets. You can
  104. make samba act as the domain master by setting "domain master = yes"
  105. in smb.conf. By default it will not be a domain master.
  106.  
  107. When samba is the domain master and the master browser it will listen
  108. for master announcements from other subnets and then contact them to
  109. synchronise browse lists.
  110.  
  111. If you want samba to be the domain master then I suggest you also set
  112. the "os level" high enough to make sure it wins elections.
  113.  
  114. NOTIFYING THE DOMAIN CONTROLLER
  115. ===============================
  116.  
  117. If you have a domain controller for the domain which Samba is a part
  118. of then you should add the line "domain controller = address" to
  119. smb.conf. "address" can either be a name available via DNS or a IP
  120. address or a broadcast address. If it is a broadcast address then
  121. Samba will look for a domain controller on that network.
  122.  
  123. When Samba is the master browser it will regularly contact the domain
  124. controller to synchronise browse lists.
  125.  
  126.  
  127. NOTE ABOUT BROADCAST ADDRESSES
  128. ==============================
  129.  
  130. If your network uses a "0" based broadcast address (for example if it
  131. ends in a 0) then you will strike problems. Windows for Workgroups
  132. does not seem to support a 0's broadcast and you will probably find
  133. that browsing and name lookups won't work.
  134.  
  135. You have a few options:
  136.  
  137. 1) change to a 1's broadcast on your unix server. These often end in
  138. .255 (check with your local network guru for details)
  139.  
  140. 2) set the nmbd broadcast to a 1's based address on the command line using
  141. the -B option. This only works if your network setup listens on both
  142. 0s and 1s based broadcasts. The -B option can only control what
  143. address it sends to, not what it listens on.
  144.  
  145.  
  146.